import { ApiProperty } from '@nestjs/swagger';
import { PresetSegmentFreqItem } from './global-config.dto';

export class TargetResItem {
  @ApiProperty()
  projectUuid: string;

  @ApiProperty()
  name: string;

  @ApiProperty()
  data: string;

  // @ApiProperty({
  //   type: 'array',
  //   items: {
  //     type: 'array',
  //     items: {
  //       type: 'string',
  //     },
  //   },
  // })
  // dataSet: string[][];

  @ApiProperty()
  default?: boolean;
}

export class GlobalConfigShowResult {
  @ApiProperty({
    type: [TargetResItem],
  })
  targets: TargetResItem[];

  @ApiProperty({
    type: [PresetSegmentFreqItem],
  })
  presetSegmentFreq: PresetSegmentFreqItem[];
}

export class GlobalConfigAdminShowResult {
  @ApiProperty({
    type: [TargetResItem],
  })
  targets: TargetResItem[];

  @ApiProperty({
    description: '敏感词，逗号分割'
  })
  sensitive: string;

  @ApiProperty({
    type: [PresetSegmentFreqItem],
  })
  presetSegmentFreq: PresetSegmentFreqItem[];
}
